home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / CIncludes / OCEMail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  48.6 KB  |  1,664 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCEMail.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __OCEMAIL__
  21. #define __OCEMAIL__
  22.  
  23.  
  24. #ifndef __APPLEEVENTS__
  25. #include <AppleEvents.h>
  26. #endif
  27. /*    #include <Errors.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <Types.h>                                            */
  30. /*    #include <Memory.h>                                            */
  31. /*        #include <MixedMode.h>                                    */
  32. /*    #include <OSUtils.h>                                        */
  33. /*    #include <Events.h>                                            */
  34. /*        #include <Quickdraw.h>                                    */
  35. /*            #include <QuickdrawText.h>                            */
  36. /*    #include <EPPC.h>                                            */
  37. /*        #include <AppleTalk.h>                                    */
  38. /*        #include <Files.h>                                        */
  39. /*            #include <Finder.h>                                    */
  40. /*        #include <PPCToolbox.h>                                    */
  41. /*        #include <Processes.h>                                    */
  42. /*    #include <Notification.h>                                    */
  43.  
  44. #ifndef __FILES__
  45. #include <Files.h>
  46. #endif
  47.  
  48. #ifndef __MEMORY__
  49. #include <Memory.h>
  50. #endif
  51.  
  52. #ifndef __TEXTEDIT__
  53. #include <TextEdit.h>
  54. #endif
  55.  
  56. #ifndef __TYPES__
  57. #include <Types.h>
  58. #endif
  59.  
  60. #ifndef __DIGITALSIGNATURE__
  61. #include <DigitalSignature.h>
  62. #endif
  63.  
  64. #ifndef __OCE__
  65. #include <OCE.h>
  66. #endif
  67. /*    #include <Aliases.h>                                        */
  68. /*    #include <Script.h>                                            */
  69. /*        #include <IntlResources.h>                                */
  70.  
  71. #ifndef __OCEAUTHDIR__
  72. #include <OCEAuthDir.h>
  73. #endif
  74.  
  75. #ifndef __OCEMESSAGING__
  76. #include <OCEMessaging.h>
  77. #endif
  78.  
  79. #ifdef __cplusplus
  80. extern "C" {
  81. #endif
  82.  
  83. #if PRAGMA_ALIGN_SUPPORTED
  84. #pragma options align=mac68k
  85. #endif
  86.  
  87. #if PRAGMA_IMPORT_SUPPORTED
  88. #pragma import on
  89. #endif
  90.  
  91. typedef union MSAMParam MSAMParam;
  92.  
  93. typedef pascal void (*MSAMIOCompletionProcPtr)(MSAMParam *paramBlock);
  94.  
  95. #if GENERATINGCFM
  96. typedef UniversalProcPtr MSAMIOCompletionUPP;
  97. #else
  98. typedef MSAMIOCompletionProcPtr MSAMIOCompletionUPP;
  99. #endif
  100.  
  101. #define MailParamBlockHeader     \
  102.     Ptr    qLink;                        \
  103.     long    reservedH1;                \
  104.     long    reservedH2;                \
  105.     MSAMIOCompletionUPP    ioCompletion;     \
  106.     OSErr    ioResult;                \
  107.     long    saveA5;                    \
  108.     short    reqCode;
  109. typedef long MailMsgRef;
  110.  
  111. /* reference to an open msam queue */
  112. typedef long MSAMQueueRef;
  113.  
  114. /* identifies slots managed by a PMSAM */
  115. typedef unsigned short MSAMSlotID;
  116.  
  117. /* reference to an active mailbox */
  118. typedef long MailboxRef;
  119.  
  120. /* identifies slots within a mailbox */
  121. typedef unsigned short MailSlotID;
  122.  
  123. /* identifies a letter in a mailbox */
  124. struct MailSeqNum {
  125.     MailSlotID                        slotID;
  126.     long                            seqNum;
  127. };
  128.  
  129. typedef struct MailSeqNum MailSeqNum;
  130.  
  131. /* A MailBuffer is used to describe a buffer used for an IO operation.
  132. The location of the buffer is pointed to by 'buffer'. 
  133. When reading, the size of the buffer is 'bufferSize' 
  134. and the size of data actually read is 'dataSize'.
  135. When writing, the size of data to be written is 'bufferSize' 
  136. and the size of data actually written is 'dataSize'.
  137. */
  138. struct MailBuffer {
  139.     long                            bufferSize;
  140.     Ptr                                buffer;
  141.     long                            dataSize;
  142. };
  143.  
  144. typedef struct MailBuffer MailBuffer;
  145.  
  146. /* A MailReply is used to describe a commonly used reply buffer format.
  147. It contains a count of tuples followed by an array of tuples.
  148. The format of the tuple itself depends on each particular call.
  149. */
  150. struct MailReply {
  151.     unsigned short                    tupleCount;
  152. /* tuple[tupleCount] */
  153. };
  154.  
  155. typedef struct MailReply MailReply;
  156.  
  157. /* Shared Memory Communication Area used when Mail Manager sends 
  158. High Level Events to a PMSAM. 
  159. */
  160. struct SMCA {
  161.     unsigned short                    smcaLength;                    /* includes size of smcaLength field */
  162.     OSErr                            result;
  163.     long                            userBytes;
  164.     union {
  165.         CreationID                        slotCID;                /* for create/modify/delete slot calls */
  166.         long                            msgHint;                /* for kMailEPPCMsgOpened */
  167.     } u;
  168. };
  169.  
  170. typedef struct SMCA SMCA;
  171.  
  172. /**************************************************************************************/
  173. /* Value of creator and types fields for messages and blocks defined by MailManager */
  174.  
  175. enum {
  176.     kMailAppleMailCreator        = 'apml',                        /* message and letter block creator */
  177.     kMailLtrMsgType                = 'lttr',                        /* message type of letters, reports */
  178.     kMailLtrHdrType                = 'lthd',                        /* contains letter header */
  179.     kMailContentType            = 'body',                        /* contains content of letter */
  180.     kMailEnclosureListType        = 'elst',                        /* contains list of enclosures */
  181.     kMailEnclosureDesktopType    = 'edsk',                        /* contains desktop mgr info for enclosures */
  182.     kMailEnclosureFileType        = 'asgl',                        /* contains a file enclosure */
  183. /* format is defined by AppleSingle */
  184.     kMailImageBodyType            = 'imag',                        /* contains image of letter */
  185. /*        format is struct TPfPgDir - in Printing.h
  186.     *    struct TPfPgDir {
  187.     *        short    pageCount;        - number of pages in the image.
  188.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  189.     *                                - to image of page n.
  190.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  191. */
  192.     kMailMSAMType                = 'gwyi',                        /* contains msam specific information */
  193.     kMailTunnelLtrType            = 'tunl',                        /* used to read a tunnelled message */
  194.     kMailHopInfoType            = 'hopi',                        /* used to read hopInfo for a tunnelled message */
  195.     kMailReportType                = 'rpti',                        /* contains report info */
  196. /*
  197. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  198. This block has a header, IPMReportBlockHeader,
  199. followed by an array of elements, each of type IPMRecipientReport
  200.  
  201. Various families used by mail or related msgs
  202. */
  203.     kMailFamily                    = 'mail',                        /* Defines family of "mail" msgs: content, header, etc */
  204.     kMailFamilyFile                = 'file'
  205. };
  206.  
  207. /**************************************************************************************/
  208. typedef unsigned short MailAttributeID;
  209.  
  210. /* Values of MailAttributeID */
  211. /* Message store attributes - stored in the catalog */
  212. /* Will always be present in a letter and have fixed sizes */
  213.  
  214. enum {
  215.     kMailLetterFlagsBit            = 1,                            /* MailLetterFlags */
  216. /* Letter attributes - stored in the letter 
  217.    Will always be present in a letter and have fixed sizes */
  218.     kMailIndicationsBit            = 3,                            /* MailIndications */
  219.     kMailMsgTypeBit                = 4,                            /* OCECreatorType */
  220.     kMailLetterIDBit            = 5,                            /* MailLetterID */
  221.     kMailSendTimeStampBit        = 6,                            /* MailTime */
  222.     kMailNestingLevelBit        = 7,                            /* MailNestingLevel */
  223.     kMailMsgFamilyBit            = 8,                            /* OSType */
  224. /* Letter attributes - stored in the letter
  225.    May be present in a letter and have fixed sizes */
  226.     kMailReplyIDBit                = 9,                            /* MailLetterID */
  227.     kMailConversationIDBit        = 10,                            /* MailLetterID */
  228. /* Letter attributes - stored in the letter
  229.    May be present in a letter and have variable length sizes */
  230.     kMailSubjectBit                = 11,                            /* RString */
  231.     kMailFromBit                = 12,                            /* MailRecipient */
  232.     kMailToBit                    = 13,                            /* MailRecipient */
  233.     kMailCcBit                    = 14,                            /* MailRecipient */
  234.     kMailBccBit                    = 15                            /* MailRecipient */
  235. };
  236.  
  237. typedef unsigned long MailAttributeMask;
  238.  
  239. /* Values of MailAttributeMask */
  240.  
  241. enum {
  242.     kMailLetterFlagsMask        = 1L << (kMailLetterFlagsBit - 1),
  243.     kMailIndicationsMask        = 1L << (kMailIndicationsBit - 1),
  244.     kMailMsgTypeMask            = 1L << (kMailMsgTypeBit - 1),
  245.     kMailLetterIDMask            = 1L << (kMailLetterIDBit - 1),
  246.     kMailSendTimeStampMask        = 1L << (kMailSendTimeStampBit - 1),
  247.     kMailNestingLevelMask        = 1L << (kMailNestingLevelBit - 1),
  248.     kMailMsgFamilyMask            = 1L << (kMailMsgFamilyBit - 1),
  249.     kMailReplyIDMask            = 1L << (kMailReplyIDBit - 1),
  250.     kMailConversationIDMask        = 1L << (kMailConversationIDBit - 1),
  251.     kMailSubjectMask            = 1L << (kMailSubjectBit - 1),
  252.     kMailFromMask                = 1L << (kMailFromBit - 1),
  253.     kMailToMask                    = 1L << (kMailToBit - 1),
  254.     kMailCcMask                    = 1L << (kMailCcBit - 1),
  255.     kMailBccMask                = 1L << (kMailBccBit - 1)
  256. };
  257.  
  258. typedef unsigned long MailAttributeBitmap;
  259.  
  260. /**************************************************************************************/
  261. typedef unsigned short MailLetterSystemFlags;
  262.  
  263. /* Values of MailLetterSystemFlags */
  264. /* letter is available locally (either by nature or via cache) */
  265.  
  266. enum {
  267.     kMailIsLocalBit                = 2
  268. };
  269.  
  270. enum {
  271.     kMailIsLocalMask            = 1L << kMailIsLocalBit
  272. };
  273.  
  274. typedef unsigned short MailLetterUserFlags;
  275.  
  276.  
  277. enum {
  278.     kMailReadBit,                                                /* this letter has been opened */
  279.     kMailDontArchiveBit,                                        /* this letter is not */
  280. /* to be archived either because 
  281.                                            it has already been archived or 
  282.                                            it should not be archived. */
  283.     kMailInTrashBit                                                /* this letter is in trash */
  284. };
  285.  
  286. /* Values of MailLetterUserFlags */
  287. enum {
  288.     kMailReadMask                = 1L << kMailReadBit,
  289.     kMailDontArchiveMask        = 1L << kMailDontArchiveBit,
  290.     kMailInTrashMask            = 1L << kMailInTrashBit
  291. };
  292.  
  293. struct MailLetterFlags {
  294.     MailLetterSystemFlags            sysFlags;
  295.     MailLetterUserFlags                userFlags;
  296. };
  297.  
  298. typedef struct MailLetterFlags MailLetterFlags;
  299.  
  300. struct MailMaskedLetterFlags {
  301.     MailLetterFlags                    flagMask;                    /* flags that are to be set */
  302.     MailLetterFlags                    flagValues;                    /* and their values */
  303. };
  304.  
  305. typedef struct MailMaskedLetterFlags MailMaskedLetterFlags;
  306.  
  307.  
  308. enum {
  309.     kMailOriginalInReportBit    = 1,
  310.     kMailNonReceiptReportsBit    = 3,
  311.     kMailReceiptReportsBit        = 4,
  312.     kMailForwardedBit            = 5,
  313.     kMailPriorityBit            = 6,
  314.     kMailIsReportWithOriginalBit = 8,
  315.     kMailIsReportBit            = 9,
  316.     kMailHasContentBit            = 10,
  317.     kMailHasSignatureBit        = 11,
  318.     kMailAuthenticatedBit        = 12,
  319.     kMailSentBit                = 13,
  320.     kMailNativeContentBit        = 14,
  321.     kMailImageContentBit        = 15,
  322.     kMailStandardContentBit        = 16
  323. };
  324.  
  325. /* Values of MailIndications */
  326. enum {
  327.     kMailStandardContentMask    = 1L << (kMailStandardContentBit - 1),
  328.     kMailImageContentMask        = 1L << (kMailImageContentBit - 1),
  329.     kMailNativeContentMask        = 1L << (kMailNativeContentBit - 1),
  330.     kMailSentMask                = 1L << (kMailSentBit - 1),
  331.     kMailAuthenticatedMask        = 1L << (kMailAuthenticatedBit - 1),
  332.     kMailHasSignatureMask        = 1L << (kMailHasSignatureBit - 1),
  333.     kMailHasContentMask            = 1L << (kMailHasContentBit - 1),
  334.     kMailIsReportMask            = 1L << (kMailIsReportBit - 1),
  335.     kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
  336.     kMailPriorityMask            = 3L << (kMailPriorityBit - 1),
  337.     kMailForwardedMask            = 1L << (kMailForwardedBit - 1),
  338.     kMailReceiptReportsMask        = 1L << (kMailReceiptReportsBit - 1),
  339.     kMailNonReceiptReportsMask    = 1L << (kMailNonReceiptReportsBit - 1),
  340.     kMailOriginalInReportMask    = 3L << (kMailOriginalInReportBit - 1)
  341. };
  342.  
  343. typedef unsigned long MailIndications;
  344.  
  345. /* values of the field originalInReport in MailIndications */
  346.  
  347. enum {
  348.     kMailNoOriginal                = 0,                            /* do not enclose original in reports */
  349.     kMailEncloseOnNonReceipt    = 3                                /* enclose original in non-delivery reports */
  350. };
  351.  
  352. typedef IPMMsgID MailLetterID;
  353.  
  354. struct MailTime {
  355.     UTCTime                            time;                        /* current UTC(GMT) time */
  356.     UTCOffset                        offset;                        /* offset from GMT */
  357. };
  358.  
  359. typedef struct MailTime MailTime;
  360.  
  361. /* innermost letter has nestingLevel 0 */
  362. typedef unsigned short MailNestingLevel;
  363.  
  364. typedef OCERecipient MailRecipient;
  365.  
  366. /**************************************************************************************/
  367.  
  368. enum {
  369.     kMailTextSegmentBit,
  370.     kMailPictSegmentBit,
  371.     kMailSoundSegmentBit,
  372.     kMailStyledTextSegmentBit,
  373.     kMailMovieSegmentBit
  374. };
  375.  
  376. typedef unsigned short MailSegmentMask;
  377.  
  378. /* Values of MailSegmentMask */
  379.  
  380. enum {
  381.     kMailTextSegmentMask        = 1L << kMailTextSegmentBit,
  382.     kMailPictSegmentMask        = 1L << kMailPictSegmentBit,
  383.     kMailSoundSegmentMask        = 1L << kMailSoundSegmentBit,
  384.     kMailStyledTextSegmentMask    = 1L << kMailStyledTextSegmentBit,
  385.     kMailMovieSegmentMask        = 1L << kMailMovieSegmentBit
  386. };
  387.  
  388. typedef unsigned short MailSegmentType;
  389.  
  390. /* Values of MailSegmentType */
  391.  
  392. enum {
  393.     kMailInvalidSegmentType        = 0,
  394.     kMailTextSegmentType        = 1,
  395.     kMailPictSegmentType        = 2,
  396.     kMailSoundSegmentType        = 3,
  397.     kMailStyledTextSegmentType    = 4,
  398.     kMailMovieSegmentType        = 5
  399. };
  400.  
  401. /**************************************************************************************/
  402. enum {
  403.     kMailErrorLogEntryVersion    = 0x101,
  404.     kMailMSAMErrorStringListID    = 128,                            /* These 'STR#' resources should be */
  405.     kMailMSAMActionStringListID    = 129                            /* in the PMSAM resource fork */
  406. };
  407.  
  408. typedef unsigned short MailLogErrorType;
  409.  
  410. /* Values of MailLogErrorType */
  411.  
  412. enum {
  413.     kMailELECorrectable            = 0,
  414.     kMailELEError                = 1,
  415.     kMailELEWarning                = 2,
  416.     kMailELEInformational        = 3
  417. };
  418.  
  419. typedef short MailLogErrorCode;
  420.  
  421. /* Values of MailLogErrorCode */
  422.  
  423. enum {
  424.     kMailMSAMErrorCode            = 0,                            /* positive codes are indices into
  425.                                                    PMSAM defined strings */
  426.     kMailMiscError                = -1,                            /* negative codes are OCE defined */
  427.     kMailNoModem                = -2                            /* modem required, but missing */
  428. };
  429.  
  430. struct MailErrorLogEntryInfo {
  431.     short                            version;
  432.     UTCTime                            timeOccurred;                /* do not fill in */
  433.     Str31                            reportingPMSAM;                /* do not fill in */
  434.     Str31                            reportingMSAMSlot;            /* do not fill in */
  435.     MailLogErrorType                errorType;
  436.     MailLogErrorCode                errorCode;
  437.     short                            errorResource;                /* resources are valid if */
  438.     short                            actionResource;                /* errorCode = kMailMSAMErrorCode
  439.                                                    index starts from 1 */
  440.     unsigned long                    filler;
  441.     unsigned short                    filler2;
  442. };
  443.  
  444. typedef struct MailErrorLogEntryInfo MailErrorLogEntryInfo;
  445.  
  446. /**************************************************************************************/
  447. typedef short MailBlockMode;
  448.  
  449. /* Values of MailBlockMode */
  450.  
  451. enum {
  452.     kMailFromStart                = 1,                            /* write data from offset calculated from */
  453.     kMailFromLEOB                = 2,                            /* start of block, end of block, */
  454.     kMailFromMark                = 3                                /* or from the current mark */
  455. };
  456.  
  457. struct MailEnclosureInfo {
  458.     StringPtr                        enclosureName;
  459.     CInfoPBPtr                        catInfo;
  460.     StringPtr                        comment;
  461.     Ptr                                icon;
  462. };
  463.  
  464. typedef struct MailEnclosureInfo MailEnclosureInfo;
  465.  
  466. /**************************************************************************************/
  467.  
  468. enum {
  469.     kOCESetupLocationNone        = 0,                            /* disconnect state */
  470.     kOCESetupLocationMax        = 8                                /* maximum location value */
  471. };
  472.  
  473. typedef char OCESetupLocation;
  474.  
  475. /* location state is a bitmask, 0x1=>1st location active, 
  476.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  477.  */
  478. #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  479. typedef unsigned char MailLocationFlags;
  480.  
  481. struct MailLocationInfo {
  482.     OCESetupLocation                location;
  483.     MailLocationFlags                active;
  484. };
  485.  
  486. typedef struct MailLocationInfo MailLocationInfo;
  487.  
  488. /**************************************************************************************/
  489. /* Definitions for Personal MSAMs */
  490. /**************************************************************************************/
  491.  
  492. enum {
  493.     kMailEPPCMsgVersion            = 3
  494. };
  495.  
  496. struct MailEPPCMsg {
  497.     short                            version;
  498.     union {
  499.         SMCA                            *theSMCA;                /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
  500.         long                            sequenceNumber;            /* for 'inqu', 'dlom' */
  501.         MailLocationInfo                locationInfo;            /* for 'locc' */
  502.     } u;
  503. };
  504.  
  505. typedef struct MailEPPCMsg MailEPPCMsg;
  506.  
  507. /* Values of OCE defined High Level Event message classes */
  508.  
  509. enum {
  510.     kMailEPPCCreateSlot            = 'crsl',
  511.     kMailEPPCModifySlot            = 'mdsl',
  512.     kMailEPPCDeleteSlot            = 'dlsl',
  513.     kMailEPPCShutDown            = 'quit',
  514.     kMailEPPCMailboxOpened        = 'mbop',
  515.     kMailEPPCMailboxClosed        = 'mbcl',
  516.     kMailEPPCMsgPending            = 'msgp',
  517.     kMailEPPCSendImmediate        = 'sndi',
  518.     kMailEPPCContinue            = 'cont',
  519.     kMailEPPCSchedule            = 'sked',
  520.     kMailEPPCAdmin                = 'admn',
  521.     kMailEPPCInQUpdate            = 'inqu',
  522.     kMailEPPCMsgOpened            = 'msgo',
  523.     kMailEPPCDeleteOutQMsg        = 'dlom',
  524.     kMailEPPCWakeup                = 'wkup',
  525.     kMailEPPCLocationChanged    = 'locc'
  526. };
  527.  
  528. union MailTimer {
  529.     long                            frequency;                    /* how often to connect */
  530.     long                            connectTime;                /* time since midnight */
  531. };
  532. typedef union MailTimer MailTimer;
  533.  
  534.  
  535. enum {
  536.     kMailTimerOff                = 0,                            /* control is off */
  537.     kMailTimerTime                = 1,                            /* specifies connect time (relative to midnight) */
  538.     kMailTimerFrequency            = 2                                /* specifies connect frequency */
  539. };
  540.  
  541. typedef Byte MailTimerKind;
  542.  
  543. struct MailTimers {
  544.     MailTimerKind                    sendTimeKind;                /* either kMailTimerTime or kMailTimerFrequency */
  545.     MailTimerKind                    receiveTimeKind;            /* either kMailTimerTime or kMailTimerFrequency */
  546.     MailTimer                        send;
  547.     MailTimer                        receive;
  548. };
  549.  
  550. typedef struct MailTimers MailTimers;
  551.  
  552. struct MailStandardSlotInfoAttribute {
  553.     short                            version;
  554.     MailLocationFlags                active;                        /* active if MailLocationMask(i) is set */
  555.     Byte                            padByte;
  556.     MailTimers                        sendReceiveTimer;
  557. };
  558.  
  559. typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
  560.  
  561. struct PMSAMGetMSAMRecordPB {
  562.     Ptr                                qLink;
  563.     long                            reservedH1;
  564.     long                            reservedH2;
  565.     MSAMIOCompletionUPP                ioCompletion;
  566.     OSErr                            ioResult;
  567.     long                            saveA5;
  568.     short                            reqCode;
  569.     CreationID                        msamCID;
  570. };
  571.  
  572. typedef struct PMSAMGetMSAMRecordPB PMSAMGetMSAMRecordPB;
  573.  
  574. struct PMSAMOpenQueuesPB {
  575.     Ptr                                qLink;
  576.     long                            reservedH1;
  577.     long                            reservedH2;
  578.     MSAMIOCompletionUPP                ioCompletion;
  579.     OSErr                            ioResult;
  580.     long                            saveA5;
  581.     short                            reqCode;
  582.     MSAMQueueRef                    inQueueRef;
  583.     MSAMQueueRef                    outQueueRef;
  584.     MSAMSlotID                        msamSlotID;
  585.     long                            filler[2];
  586. };
  587.  
  588. typedef struct PMSAMOpenQueuesPB PMSAMOpenQueuesPB;
  589.  
  590. typedef unsigned short PMSAMStatus;
  591.  
  592. /* Values of PMSAMStatus */
  593.  
  594. enum {
  595.     kPMSAMStatusPending            = 1,                            /* for inQueue and outQueue */
  596.     kPMSAMStatusError            = 2,                            /* for inQueue and outQueue */
  597.     kPMSAMStatusSending            = 3,                            /* for outQueue only */
  598.     kPMSAMStatusCaching            = 4,                            /* for inQueue only */
  599.     kPMSAMStatusSent            = 5                                /* for outQueue only */
  600. };
  601.  
  602. struct PMSAMSetStatusPB {
  603.     Ptr                                qLink;
  604.     long                            reservedH1;
  605.     long                            reservedH2;
  606.     MSAMIOCompletionUPP                ioCompletion;
  607.     OSErr                            ioResult;
  608.     long                            saveA5;
  609.     short                            reqCode;
  610.     MSAMQueueRef                    queueRef;
  611.     long                            seqNum;
  612.     long                            msgHint;                    /* for posting cache error,set this to 0 when report outq status */
  613.     PMSAMStatus                        status;
  614. };
  615.  
  616. typedef struct PMSAMSetStatusPB PMSAMSetStatusPB;
  617.  
  618. struct PMSAMLogErrorPB {
  619.     Ptr                                qLink;
  620.     long                            reservedH1;
  621.     long                            reservedH2;
  622.     MSAMIOCompletionUPP                ioCompletion;
  623.     OSErr                            ioResult;
  624.     long                            saveA5;
  625.     short                            reqCode;
  626.     MSAMSlotID                        msamSlotID;                    /* 0 for PMSAM errors */
  627.     MailErrorLogEntryInfo            *logEntry;
  628.     long                            filler[2];
  629. };
  630.  
  631. typedef struct PMSAMLogErrorPB PMSAMLogErrorPB;
  632.  
  633. /****************************************************************************************/
  634.  
  635. enum {
  636.     kMailMsgSummaryVersion        = 1
  637. };
  638.  
  639. struct MailMasterData {
  640.     MailAttributeBitmap                attrMask;                    /* indicates attributes present in MsgSummary */
  641.     MailLetterID                    messageID;
  642.     MailLetterID                    replyID;
  643.     MailLetterID                    conversationID;
  644. };
  645.  
  646. typedef struct MailMasterData MailMasterData;
  647.  
  648. /* Values for addressedToMe in struct MailCoreData */
  649.  
  650. enum {
  651.     kAddressedAs_TO                = 0x1,
  652.     kAddressedAs_CC                = 0x2,
  653.     kAddressedAs_BCC            = 0x4
  654. };
  655.  
  656. struct MailCoreData {
  657.     MailLetterFlags                    letterFlags;
  658.     unsigned long                    messageSize;
  659.     MailIndications                    letterIndications;
  660.     OCECreatorType                    messageType;
  661.     MailTime                        sendTime;
  662.     OSType                            messageFamily;
  663.     unsigned char                    reserved;
  664.     unsigned char                    addressedToMe;
  665.     char                            agentInfo[6];                /* 6 bytes of special info [set to zero]
  666.     * these are variable length and even padded */
  667.     RString32                        sender;                        /* recipient's entityName (trunc)*/
  668.     RString32                        subject;                    /* subject maybe truncated */
  669. };
  670.  
  671. typedef struct MailCoreData MailCoreData;
  672.  
  673. struct MSAMMsgSummary {
  674.     short                            version;                    /* following flags are defaulted by Toolbox */
  675.     Boolean                            msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  676.     Boolean                            msgUpdated;                    /* true if msgSummary was updated by MailManager */
  677.     Boolean                            msgCached;                    /* true if msg is in the slot's InQueue */
  678.     Byte                            padByte;
  679.     MailMasterData                    masterData;
  680.     MailCoreData                    coreData;
  681. };
  682.  
  683. typedef struct MSAMMsgSummary MSAMMsgSummary;
  684.  
  685. /* PMSAM can put up to 128 bytes of private msg summary data */
  686.  
  687. enum {
  688.     kMailMaxPMSAMMsgSummaryData    = 128
  689. };
  690.  
  691. struct PMSAMCreateMsgSummaryPB {
  692.     Ptr                                qLink;
  693.     long                            reservedH1;
  694.     long                            reservedH2;
  695.     MSAMIOCompletionUPP                ioCompletion;
  696.     OSErr                            ioResult;
  697.     long                            saveA5;
  698.     short                            reqCode;
  699.     MSAMQueueRef                    inQueueRef;
  700.     long                            seqNum;                        /* <- seq of the new message */
  701.     MSAMMsgSummary                    *msgSummary;                /* attributes and mask filled in */
  702.     MailBuffer                        *buffer;                    /* PMSAM specific data to be appended */
  703. };
  704.  
  705. typedef struct PMSAMCreateMsgSummaryPB PMSAMCreateMsgSummaryPB;
  706.  
  707. struct PMSAMPutMsgSummaryPB {
  708.     Ptr                                qLink;
  709.     long                            reservedH1;
  710.     long                            reservedH2;
  711.     MSAMIOCompletionUPP                ioCompletion;
  712.     OSErr                            ioResult;
  713.     long                            saveA5;
  714.     short                            reqCode;
  715.     MSAMQueueRef                    inQueueRef;
  716.     long                            seqNum;
  717.     MailMaskedLetterFlags            *letterFlags;                /* if not nil, then set msgStoreFlags */
  718.     MailBuffer                        *buffer;                    /* PMSAM specific data to be overwritten */
  719. };
  720.  
  721. typedef struct PMSAMPutMsgSummaryPB PMSAMPutMsgSummaryPB;
  722.  
  723. struct PMSAMGetMsgSummaryPB {
  724.     Ptr                                qLink;
  725.     long                            reservedH1;
  726.     long                            reservedH2;
  727.     MSAMIOCompletionUPP                ioCompletion;
  728.     OSErr                            ioResult;
  729.     long                            saveA5;
  730.     short                            reqCode;
  731.     MSAMQueueRef                    inQueueRef;
  732.     long                            seqNum;
  733.     MSAMMsgSummary                    *msgSummary;                /* if not nil, then read in the msgSummary */
  734.     MailBuffer                        *buffer;                    /* PMSAM specific data to be read */
  735.     unsigned short                    msgSummaryOffset;            /* offset of PMSAM specific data
  736.                                                from start of MsgSummary */
  737. };
  738.  
  739. typedef struct PMSAMGetMsgSummaryPB PMSAMGetMsgSummaryPB;
  740.  
  741. /****************************************************************************************/
  742. /* Definitions for Server MSAMs */
  743. /**************************************************************************************/
  744. typedef unsigned short SMSAMAdminCode;
  745.  
  746. /* Values of SMSAMAdminCode */
  747.  
  748. enum {
  749.     kSMSAMNotifyFwdrSetupChange    = 1,
  750.     kSMSAMNotifyFwdrNameChange    = 2,
  751.     kSMSAMNotifyFwdrPwdChange    = 3,
  752.     kSMSAMGetDynamicFwdrParams    = 4
  753. };
  754.  
  755. typedef unsigned long SMSAMSlotChanges;
  756.  
  757.  
  758. enum {
  759.     kSMSAMFwdrHomeInternetChangedBit,
  760.     kSMSAMFwdrConnectedToChangedBit,
  761.     kSMSAMFwdrForeignRLIsChangedBit,
  762.     kSMSAMFwdrMnMServerChangedBit
  763. };
  764.  
  765. /* Values of SMSAMSlotChanges */
  766. enum {
  767.     kSMSAMFwdrEverythingChangedMask = -1,
  768.     kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
  769.     kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
  770.     kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
  771.     kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
  772. };
  773.  
  774. /* kSMSAMNotifyFwdrSetupChange */
  775. struct SMSAMSetupChange {
  776.     SMSAMSlotChanges                whatChanged;                /*  --> bitmap of what parameters changed */
  777.     AddrBlock                        serverHint;                    /*  --> try this ADAP server first */
  778. };
  779.  
  780. typedef struct SMSAMSetupChange SMSAMSetupChange;
  781.  
  782. /* kSMSAMNotifyFwdrNameChange */
  783. struct SMSAMNameChange {
  784.     RString                            newName;                    /*  --> msams new name */
  785.     AddrBlock                        serverHint;                    /*  --> try this ADAP server first */
  786. };
  787.  
  788. typedef struct SMSAMNameChange SMSAMNameChange;
  789.  
  790. /* kSMSAMNotifyFwdrPasswordChange */
  791. struct SMSAMPasswordChange {
  792.     RString                            newPassword;                /*  --> msams new password */
  793.     AddrBlock                        serverHint;                    /*  --> try this ADAP server first */
  794. };
  795.  
  796. typedef struct SMSAMPasswordChange SMSAMPasswordChange;
  797.  
  798. /* kSMSAMGetDynamicFwdrParams */
  799. struct SMSAMDynamicParams {
  800.     unsigned long                    curDiskUsed;                /* <--  amount of disk space used by msam */
  801.     unsigned long                    curMemoryUsed;                /* <--  amount of memory used by msam */
  802. };
  803.  
  804. typedef struct SMSAMDynamicParams SMSAMDynamicParams;
  805.  
  806. struct SMSAMAdminEPPCRequest {
  807.     SMSAMAdminCode                    adminCode;
  808.     union {
  809.         SMSAMSetupChange                setupChange;
  810.         SMSAMNameChange                    nameChange;
  811.         SMSAMPasswordChange                passwordChange;
  812.         SMSAMDynamicParams                dynamicParams;
  813.     } u;
  814. };
  815.  
  816. typedef struct SMSAMAdminEPPCRequest SMSAMAdminEPPCRequest;
  817.  
  818. struct SMSAMSetupPB {
  819.     Ptr                                qLink;
  820.     long                            reservedH1;
  821.     long                            reservedH2;
  822.     MSAMIOCompletionUPP                ioCompletion;
  823.     OSErr                            ioResult;
  824.     long                            saveA5;
  825.     short                            reqCode;
  826.     RecordIDPtr                        serverMSAM;
  827.     RStringPtr                        password;
  828.     OSType                            gatewayType;
  829.     RStringPtr                        gatewayTypeDescription;
  830.     AddrBlock                        catalogServerHint;
  831. };
  832.  
  833. typedef struct SMSAMSetupPB SMSAMSetupPB;
  834.  
  835. struct SMSAMStartupPB {
  836.     Ptr                                qLink;
  837.     long                            reservedH1;
  838.     long                            reservedH2;
  839.     MSAMIOCompletionUPP                ioCompletion;
  840.     OSErr                            ioResult;
  841.     long                            saveA5;
  842.     short                            reqCode;
  843.     AuthIdentity                    msamIdentity;
  844.     MSAMQueueRef                    queueRef;
  845. };
  846.  
  847. typedef struct SMSAMStartupPB SMSAMStartupPB;
  848.  
  849. struct SMSAMShutdownPB {
  850.     Ptr                                qLink;
  851.     long                            reservedH1;
  852.     long                            reservedH2;
  853.     MSAMIOCompletionUPP                ioCompletion;
  854.     OSErr                            ioResult;
  855.     long                            saveA5;
  856.     short                            reqCode;
  857.     MSAMQueueRef                    queueRef;
  858. };
  859.  
  860. typedef struct SMSAMShutdownPB SMSAMShutdownPB;
  861.  
  862. /****************************************************************************************/
  863. /* Definitions for reading and writing MSAM Letters */
  864. /****************************************************************************************/
  865. struct MSAMEnumeratePB {
  866.     Ptr                                qLink;
  867.     long                            reservedH1;
  868.     long                            reservedH2;
  869.     MSAMIOCompletionUPP                ioCompletion;
  870.     OSErr                            ioResult;
  871.     long                            saveA5;
  872.     short                            reqCode;
  873.     MSAMQueueRef                    queueRef;
  874.     long                            startSeqNum;
  875.     long                            nextSeqNum;
  876. /* buffer contains a Mail Reply. Each tuple is a 
  877.     MSAMEnumerateInQReply when enumerating the inQueue
  878.     MSAMEnumerateOutQReply when enumerating the outQueue */
  879.     MailBuffer                        buffer;
  880. };
  881.  
  882. typedef struct MSAMEnumeratePB MSAMEnumeratePB;
  883.  
  884. struct MSAMEnumerateInQReply {
  885.     long                            seqNum;
  886.     Boolean                            msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  887.     Boolean                            msgUpdated;                    /* true if MsgSummary has been updated by TB */
  888.     Boolean                            msgCached;                    /* true if msg is in the incoming queue */
  889.     Byte                            padByte;
  890. };
  891.  
  892. typedef struct MSAMEnumerateInQReply MSAMEnumerateInQReply;
  893.  
  894. struct MSAMEnumerateOutQReply {
  895.     long                            seqNum;
  896.     Boolean                            done;                        /* true if all responsible recipients have been processed */
  897.     IPMPriority                        priority;
  898.     OSType                            msgFamily;
  899.     long                            approxSize;
  900.     Boolean                            tunnelForm;                    /* true if this letter has to be tunnelled */
  901.     Byte                            padByte;
  902.     NetworkSpec                        nextHop;                    /* valid if tunnelForm is true */
  903.     OCECreatorType                    msgType;
  904. };
  905.  
  906. typedef struct MSAMEnumerateOutQReply MSAMEnumerateOutQReply;
  907.  
  908. struct MSAMDeletePB {
  909.     Ptr                                qLink;
  910.     long                            reservedH1;
  911.     long                            reservedH2;
  912.     MSAMIOCompletionUPP                ioCompletion;
  913.     OSErr                            ioResult;
  914.     long                            saveA5;
  915.     short                            reqCode;
  916.     MSAMQueueRef                    queueRef;
  917.     long                            seqNum;
  918.     Boolean                            msgOnly;                    /* only valid for PMSAM & inQueue */
  919. /* set true to delete message but not msgSummary */
  920.     Byte                            padByte;
  921. /* only valid for SMSAM & tunnelled messages */
  922.     OSErr                            result;
  923. };
  924.  
  925. typedef struct MSAMDeletePB MSAMDeletePB;
  926.  
  927. struct MSAMOpenPB {
  928.     Ptr                                qLink;
  929.     long                            reservedH1;
  930.     long                            reservedH2;
  931.     MSAMIOCompletionUPP                ioCompletion;
  932.     OSErr                            ioResult;
  933.     long                            saveA5;
  934.     short                            reqCode;
  935.     MSAMQueueRef                    queueRef;
  936.     long                            seqNum;
  937.     MailMsgRef                        mailMsgRef;
  938. };
  939.  
  940. typedef struct MSAMOpenPB MSAMOpenPB;
  941.  
  942. struct MSAMOpenNestedPB {
  943.     Ptr                                qLink;
  944.     long                            reservedH1;
  945.     long                            reservedH2;
  946.     MSAMIOCompletionUPP                ioCompletion;
  947.     OSErr                            ioResult;
  948.     long                            saveA5;
  949.     short                            reqCode;
  950.     MailMsgRef                        mailMsgRef;
  951.     MailMsgRef                        nestedRef;
  952. };
  953.  
  954. typedef struct MSAMOpenNestedPB MSAMOpenNestedPB;
  955.  
  956. struct MSAMClosePB {
  957.     Ptr                                qLink;
  958.     long                            reservedH1;
  959.     long                            reservedH2;
  960.     MSAMIOCompletionUPP                ioCompletion;
  961.     OSErr                            ioResult;
  962.     long                            saveA5;
  963.     short                            reqCode;
  964.     MailMsgRef                        mailMsgRef;
  965. };
  966.  
  967. typedef struct MSAMClosePB MSAMClosePB;
  968.  
  969. struct MSAMGetMsgHeaderPB {
  970.     Ptr                                qLink;
  971.     long                            reservedH1;
  972.     long                            reservedH2;
  973.     MSAMIOCompletionUPP                ioCompletion;
  974.     OSErr                            ioResult;
  975.     long                            saveA5;
  976.     short                            reqCode;
  977.     MailMsgRef                        mailMsgRef;
  978.     IPMHeaderSelector                selector;
  979.     Boolean                            filler1;
  980.     unsigned long                    offset;
  981.     MailBuffer                        buffer;
  982.     unsigned long                    remaining;
  983. };
  984.  
  985. typedef struct MSAMGetMsgHeaderPB MSAMGetMsgHeaderPB;
  986.  
  987. struct MSAMGetAttributesPB {
  988.     Ptr                                qLink;
  989.     long                            reservedH1;
  990.     long                            reservedH2;
  991.     MSAMIOCompletionUPP                ioCompletion;
  992.     OSErr                            ioResult;
  993.     long                            saveA5;
  994.     short                            reqCode;
  995.     MailMsgRef                        mailMsgRef;
  996.     MailAttributeBitmap                requestMask;                /* kMailIndicationsBit thru kMailSubjectBit */
  997.     MailBuffer                        buffer;
  998. /*    buffer returned will contain the attribute values of 
  999.         the attributes indicated in responseMask, 
  1000.         from the attribute indicated by the least significant bit set
  1001.         to the attribute indicated by the most significant bit set.
  1002.         Note that recipients - from, to, cc, bcc cannot be read using
  1003.         this call. Use GetRecipients to read these. */
  1004.     MailAttributeBitmap                responseMask;
  1005.     Boolean                            more;
  1006.     Boolean                            filler1;
  1007. };
  1008.  
  1009. typedef struct MSAMGetAttributesPB MSAMGetAttributesPB;
  1010.  
  1011. /* attrID value to get resolved recipient list */
  1012.  
  1013. enum {
  1014.     kMailResolvedList            = 0
  1015. };
  1016.  
  1017. struct MailOriginalRecipient {
  1018.     short                            index;
  1019. };
  1020.  
  1021. /* Followed by OCEPackedRecipient */
  1022. typedef struct MailOriginalRecipient MailOriginalRecipient;
  1023.  
  1024. struct MailResolvedRecipient {
  1025.     short                            index;
  1026.     short                            recipientFlags;
  1027.     Boolean                            responsible;
  1028.     Byte                            padByte;
  1029. };
  1030.  
  1031. /* Followed by OCEPackedRecipient */
  1032. typedef struct MailResolvedRecipient MailResolvedRecipient;
  1033.  
  1034. struct MSAMGetRecipientsPB {
  1035.     Ptr                                qLink;
  1036.     long                            reservedH1;
  1037.     long                            reservedH2;
  1038.     MSAMIOCompletionUPP                ioCompletion;
  1039.     OSErr                            ioResult;
  1040.     long                            saveA5;
  1041.     short                            reqCode;
  1042.     MailMsgRef                        mailMsgRef;
  1043.     MailAttributeID                    attrID;                        /* kMailFromBit thru kMailBccBit */
  1044.     unsigned short                    startIndex;                    /* starts at 1 */
  1045.     MailBuffer                        buffer;
  1046. /*     buffer contains a Mail Reply. Each tuple is a
  1047.         MailOriginalRecipient if getting original recipients 
  1048.                                 ie the attrID is kMail[From, To, Cc, Bcc]Bit
  1049.         MailResolvedRecipient if getting resolved reicpients
  1050.                                 ie the attrID is kMailResolvedList
  1051.         Both tuples are word alligned.  */
  1052.     unsigned short                    nextIndex;
  1053.     Boolean                            more;
  1054.     Boolean                            filler1;
  1055. };
  1056.  
  1057. typedef struct MSAMGetRecipientsPB MSAMGetRecipientsPB;
  1058.  
  1059. struct MSAMGetContentPB {
  1060.     Ptr                                qLink;
  1061.     long                            reservedH1;
  1062.     long                            reservedH2;
  1063.     MSAMIOCompletionUPP                ioCompletion;
  1064.     OSErr                            ioResult;
  1065.     long                            saveA5;
  1066.     short                            reqCode;
  1067.     MailMsgRef                        mailMsgRef;
  1068.     MailSegmentMask                    segmentMask;
  1069.     MailBuffer                        buffer;
  1070.     StScrpRec                        *textScrap;
  1071.     ScriptCode                        script;
  1072.     MailSegmentType                    segmentType;
  1073.     Boolean                            endOfScript;
  1074.     Boolean                            endOfSegment;
  1075.     Boolean                            endOfContent;
  1076.     Boolean                            filler1;
  1077.     long                            segmentLength;                /* NEW: <-  valid first call in a segment */
  1078.     long                            segmentID;                    /* NEW: <-> identifier for this segment */
  1079. };
  1080.  
  1081. typedef struct MSAMGetContentPB MSAMGetContentPB;
  1082.  
  1083. struct MSAMGetEnclosurePB {
  1084.     Ptr                                qLink;
  1085.     long                            reservedH1;
  1086.     long                            reservedH2;
  1087.     MSAMIOCompletionUPP                ioCompletion;
  1088.     OSErr                            ioResult;
  1089.     long                            saveA5;
  1090.     short                            reqCode;
  1091.     MailMsgRef                        mailMsgRef;
  1092.     Boolean                            contentEnclosure;
  1093.     Byte                            padByte;
  1094.     MailBuffer                        buffer;
  1095.     Boolean                            endOfFile;
  1096.     Boolean                            endOfEnclosures;
  1097. };
  1098.  
  1099. typedef struct MSAMGetEnclosurePB MSAMGetEnclosurePB;
  1100.  
  1101. struct MailBlockInfo {
  1102.     OCECreatorType                    blockType;
  1103.     unsigned long                    offset;
  1104.     unsigned long                    blockLength;
  1105. };
  1106.  
  1107. typedef struct MailBlockInfo MailBlockInfo;
  1108.  
  1109. struct MSAMEnumerateBlocksPB {
  1110.     Ptr                                qLink;
  1111.     long                            reservedH1;
  1112.     long                            reservedH2;
  1113.     MSAMIOCompletionUPP                ioCompletion;
  1114.     OSErr                            ioResult;
  1115.     long                            saveA5;
  1116.     short                            reqCode;
  1117.     MailMsgRef                        mailMsgRef;
  1118.     unsigned short                    startIndex;                    /* starts at 1 */
  1119.     MailBuffer                        buffer;
  1120. /*     buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
  1121.     unsigned short                    nextIndex;
  1122.     Boolean                            more;
  1123.     Boolean                            filler1;
  1124. };
  1125.  
  1126. typedef struct MSAMEnumerateBlocksPB MSAMEnumerateBlocksPB;
  1127.  
  1128. struct MSAMGetBlockPB {
  1129.     Ptr                                qLink;
  1130.     long                            reservedH1;
  1131.     long                            reservedH2;
  1132.     MSAMIOCompletionUPP                ioCompletion;
  1133.     OSErr                            ioResult;
  1134.     long                            saveA5;
  1135.     short                            reqCode;
  1136.     MailMsgRef                        mailMsgRef;
  1137.     OCECreatorType                    blockType;
  1138.     unsigned short                    blockIndex;
  1139.     MailBuffer                        buffer;
  1140.     unsigned long                    dataOffset;
  1141.     Boolean                            endOfBlock;
  1142.     Byte                            padByte;
  1143.     unsigned long                    remaining;
  1144. };
  1145.  
  1146. typedef struct MSAMGetBlockPB MSAMGetBlockPB;
  1147.  
  1148. /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1149.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1150.  * REASONS.
  1151. */
  1152. /* not valid for tunnel form letters */
  1153. struct MSAMMarkRecipientsPB {
  1154.     Ptr                                qLink;
  1155.     long                            reservedH1;
  1156.     long                            reservedH2;
  1157.     MSAMIOCompletionUPP                ioCompletion;
  1158.     OSErr                            ioResult;
  1159.     long                            saveA5;
  1160.     short                            reqCode;
  1161.     MSAMQueueRef                    queueRef;
  1162.     long                            seqNum;
  1163. /*     buffer contains a Mail Reply. Each tuple is an unsigned short,
  1164.         the index of a recipient to be marked. */
  1165.     MailBuffer                        buffer;
  1166. };
  1167.  
  1168. typedef struct MSAMMarkRecipientsPB MSAMMarkRecipientsPB;
  1169.  
  1170. /* 
  1171.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1172.  * queueRef, seqNum 
  1173. */
  1174. /* not valid for tunnel form letters */
  1175. struct MSAMnMarkRecipientsPB {
  1176.     Ptr                                qLink;
  1177.     long                            reservedH1;
  1178.     long                            reservedH2;
  1179.     MSAMIOCompletionUPP                ioCompletion;
  1180.     OSErr                            ioResult;
  1181.     long                            saveA5;
  1182.     short                            reqCode;
  1183.     MailMsgRef                        mailMsgRef;
  1184. /*     buffer contains a Mail Reply. Each tuple is an unsigned short,
  1185.         the index of a recipient to be marked. */
  1186.     MailBuffer                        buffer;
  1187. };
  1188.  
  1189. typedef struct MSAMnMarkRecipientsPB MSAMnMarkRecipientsPB;
  1190.  
  1191. /****************************************************************************************/
  1192. struct MSAMCreatePB {
  1193.     Ptr                                qLink;
  1194.     long                            reservedH1;
  1195.     long                            reservedH2;
  1196.     MSAMIOCompletionUPP                ioCompletion;
  1197.     OSErr                            ioResult;
  1198.     long                            saveA5;
  1199.     short                            reqCode;
  1200.     MSAMQueueRef                    queueRef;
  1201.     Boolean                            asLetter;                    /* indicate if we should create as letter or msg */
  1202.     Boolean                            filler1;
  1203.     IPMMsgType                        msgType;                    /* up to application discretion: must be of IPMSenderTag
  1204.                                            kIPMOSFormatType for asLetter=true */
  1205.     long                            refCon;                        /* for messages only */
  1206.     long                            seqNum;                        /* set if creating message in the inQueue */
  1207.     Boolean                            tunnelForm;                    /* if true tunnelForm else newForm */
  1208.     Boolean                            bccRecipients;                /* true if creating letter with bcc recipients */
  1209.     MailMsgRef                        newRef;
  1210. };
  1211.  
  1212. typedef struct MSAMCreatePB MSAMCreatePB;
  1213.  
  1214. struct MSAMBeginNestedPB {
  1215.     Ptr                                qLink;
  1216.     long                            reservedH1;
  1217.     long                            reservedH2;
  1218.     MSAMIOCompletionUPP                ioCompletion;
  1219.     OSErr                            ioResult;
  1220.     long                            saveA5;
  1221.     short                            reqCode;
  1222.     MailMsgRef                        mailMsgRef;
  1223.     long                            refCon;                        /* for messages only */
  1224.     IPMMsgType                        msgType;
  1225. };
  1226.  
  1227. typedef struct MSAMBeginNestedPB MSAMBeginNestedPB;
  1228.  
  1229. struct MSAMEndNestedPB {
  1230.     Ptr                                qLink;
  1231.     long                            reservedH1;
  1232.     long                            reservedH2;
  1233.     MSAMIOCompletionUPP                ioCompletion;
  1234.     OSErr                            ioResult;
  1235.     long                            saveA5;
  1236.     short                            reqCode;
  1237.     MailMsgRef                        mailMsgRef;
  1238. };
  1239.  
  1240. typedef struct MSAMEndNestedPB MSAMEndNestedPB;
  1241.  
  1242. struct MSAMSubmitPB {
  1243.     Ptr                                qLink;
  1244.     long                            reservedH1;
  1245.     long                            reservedH2;
  1246.     MSAMIOCompletionUPP                ioCompletion;
  1247.     OSErr                            ioResult;
  1248.     long                            saveA5;
  1249.     short                            reqCode;
  1250.     MailMsgRef                        mailMsgRef;
  1251.     Boolean                            submitFlag;
  1252.     Byte                            padByte;
  1253.     MailLetterID                    msgID;
  1254. };
  1255.  
  1256. typedef struct MSAMSubmitPB MSAMSubmitPB;
  1257.  
  1258. struct MSAMPutMsgHeaderPB {
  1259.     Ptr                                qLink;
  1260.     long                            reservedH1;
  1261.     long                            reservedH2;
  1262.     MSAMIOCompletionUPP                ioCompletion;
  1263.     OSErr                            ioResult;
  1264.     long                            saveA5;
  1265.     short                            reqCode;
  1266.     MailMsgRef                        mailMsgRef;
  1267.     OCERecipient                    *replyQueue;
  1268.     IPMSender                        *sender;
  1269.     IPMNotificationType                deliveryNotification;
  1270.     IPMPriority                        priority;
  1271. };
  1272.  
  1273. typedef struct MSAMPutMsgHeaderPB MSAMPutMsgHeaderPB;
  1274.  
  1275. struct MSAMPutAttributePB {
  1276.     Ptr                                qLink;
  1277.     long                            reservedH1;
  1278.     long                            reservedH2;
  1279.     MSAMIOCompletionUPP                ioCompletion;
  1280.     OSErr                            ioResult;
  1281.     long                            saveA5;
  1282.     short                            reqCode;
  1283.     MailMsgRef                        mailMsgRef;
  1284.     MailAttributeID                    attrID;                        /* kMailIndicationsBit thru kMailSubjectBit */
  1285.     MailBuffer                        buffer;
  1286. };
  1287.  
  1288. typedef struct MSAMPutAttributePB MSAMPutAttributePB;
  1289.  
  1290. struct MSAMPutRecipientPB {
  1291.     Ptr                                qLink;
  1292.     long                            reservedH1;
  1293.     long                            reservedH2;
  1294.     MSAMIOCompletionUPP                ioCompletion;
  1295.     OSErr                            ioResult;
  1296.     long                            saveA5;
  1297.     short                            reqCode;
  1298.     MailMsgRef                        mailMsgRef;
  1299.     MailAttributeID                    attrID;                        /* kMailFromBit thru kMailBccBit */
  1300.     MailRecipient                    *recipient;
  1301.     Boolean                            responsible;                /* valid for server and message msams only */
  1302.     Boolean                            filler1;
  1303. };
  1304.  
  1305. typedef struct MSAMPutRecipientPB MSAMPutRecipientPB;
  1306.  
  1307. struct MSAMPutContentPB {
  1308.     Ptr                                qLink;
  1309.     long                            reservedH1;
  1310.     long                            reservedH2;
  1311.     MSAMIOCompletionUPP                ioCompletion;
  1312.     OSErr                            ioResult;
  1313.     long                            saveA5;
  1314.     short                            reqCode;
  1315.     MailMsgRef                        mailMsgRef;
  1316.     MailSegmentType                    segmentType;
  1317.     Boolean                            append;
  1318.     Byte                            padByte;
  1319.     MailBuffer                        buffer;
  1320.     StScrpRec                        *textScrap;
  1321.     Boolean                            startNewScript;
  1322.     Boolean                            filler1;
  1323.     ScriptCode                        script;                        /* valid only if startNewScript is true */
  1324. };
  1325.  
  1326. typedef struct MSAMPutContentPB MSAMPutContentPB;
  1327.  
  1328. struct MSAMPutEnclosurePB {
  1329.     Ptr                                qLink;
  1330.     long                            reservedH1;
  1331.     long                            reservedH2;
  1332.     MSAMIOCompletionUPP                ioCompletion;
  1333.     OSErr                            ioResult;
  1334.     long                            saveA5;
  1335.     short                            reqCode;
  1336.     MailMsgRef                        mailMsgRef;
  1337.     Boolean                            contentEnclosure;
  1338.     Byte                            padByte;
  1339.     Boolean                            hfs;                        /* true => in file system, false => in memory */
  1340.     Boolean                            append;
  1341.     MailBuffer                        buffer;                        /* Unused if hfs == true */
  1342.     FSSpec                            enclosure;
  1343.     MailEnclosureInfo                addlInfo;
  1344. };
  1345.  
  1346. typedef struct MSAMPutEnclosurePB MSAMPutEnclosurePB;
  1347.  
  1348. struct MSAMPutBlockPB {
  1349.     Ptr                                qLink;
  1350.     long                            reservedH1;
  1351.     long                            reservedH2;
  1352.     MSAMIOCompletionUPP                ioCompletion;
  1353.     OSErr                            ioResult;
  1354.     long                            saveA5;
  1355.     short                            reqCode;
  1356.     MailMsgRef                        mailMsgRef;
  1357.     long                            refCon;                        /* for messages only */
  1358.     OCECreatorType                    blockType;
  1359.     Boolean                            append;
  1360.     Boolean                            filler1;
  1361.     MailBuffer                        buffer;
  1362.     MailBlockMode                    mode;                        /* if blockType is kMailTunnelLtrType or kMailHopInfoType
  1363.                                        mode is assumed to be kMailFromMark */
  1364.     unsigned long                    offset;
  1365. };
  1366.  
  1367. typedef struct MSAMPutBlockPB MSAMPutBlockPB;
  1368.  
  1369. /****************************************************************************************/
  1370. struct MSAMCreateReportPB {
  1371.     Ptr                                qLink;
  1372.     long                            reservedH1;
  1373.     long                            reservedH2;
  1374.     MSAMIOCompletionUPP                ioCompletion;
  1375.     OSErr                            ioResult;
  1376.     long                            saveA5;
  1377.     short                            reqCode;
  1378.     MSAMQueueRef                    queueRef;                    /* to distinguish personal and server MSAMs */
  1379.     MailMsgRef                        mailMsgRef;
  1380.     MailLetterID                    msgID;                        /* kMailLetterIDBit of letter being reported upon */
  1381.     MailRecipient                    *sender;                    /* sender of the letter you are creating report on */
  1382. };
  1383.  
  1384. typedef struct MSAMCreateReportPB MSAMCreateReportPB;
  1385.  
  1386. struct MSAMPutRecipientReportPB {
  1387.     Ptr                                qLink;
  1388.     long                            reservedH1;
  1389.     long                            reservedH2;
  1390.     MSAMIOCompletionUPP                ioCompletion;
  1391.     OSErr                            ioResult;
  1392.     long                            saveA5;
  1393.     short                            reqCode;
  1394.     MailMsgRef                        mailMsgRef;
  1395.     short                            recipientIndex;                /* recipient index in the original letter */
  1396.     OSErr                            result;                        /* result of sending the recipient */
  1397. };
  1398.  
  1399. typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
  1400.  
  1401. /****************************************************************************************/
  1402. struct MailWakeupPMSAMPB {
  1403.     Ptr                                qLink;
  1404.     long                            reservedH1;
  1405.     long                            reservedH2;
  1406.     MSAMIOCompletionUPP                ioCompletion;
  1407.     OSErr                            ioResult;
  1408.     long                            saveA5;
  1409.     short                            reqCode;
  1410.     CreationID                        pmsamCID;
  1411.     MailSlotID                        mailSlotID;
  1412. };
  1413.  
  1414. typedef struct MailWakeupPMSAMPB MailWakeupPMSAMPB;
  1415.  
  1416. struct MailCreateMailSlotPB {
  1417.     Ptr                                qLink;
  1418.     long                            reservedH1;
  1419.     long                            reservedH2;
  1420.     MSAMIOCompletionUPP                ioCompletion;
  1421.     OSErr                            ioResult;
  1422.     long                            saveA5;
  1423.     short                            reqCode;
  1424.     MailboxRef                        mailboxRef;
  1425.     long                            timeout;
  1426.     CreationID                        pmsamCID;
  1427.     SMCA                            smca;
  1428. };
  1429.  
  1430. typedef struct MailCreateMailSlotPB MailCreateMailSlotPB;
  1431.  
  1432. struct MailModifyMailSlotPB {
  1433.     Ptr                                qLink;
  1434.     long                            reservedH1;
  1435.     long                            reservedH2;
  1436.     MSAMIOCompletionUPP                ioCompletion;
  1437.     OSErr                            ioResult;
  1438.     long                            saveA5;
  1439.     short                            reqCode;
  1440.     MailboxRef                        mailboxRef;
  1441.     long                            timeout;
  1442.     CreationID                        pmsamCID;
  1443.     SMCA                            smca;
  1444. };
  1445.  
  1446. typedef struct MailModifyMailSlotPB MailModifyMailSlotPB;
  1447.  
  1448. /****************************************************************************************/
  1449. #define kPMSAMGetMSAMRecord 1286
  1450. #define kPMSAMOpenQueues 1280
  1451. #define kPMSAMLogError 1313
  1452. #define kPMSAMSetStatus 1319
  1453. #define kPMSAMCreateMsgSummary 1314
  1454. #define kPMSAMPutMsgSummary 1317
  1455. #define kPMSAMGetMsgSummary 1318
  1456. #define kMailWakeupPMSAM 1287
  1457. #define kSMSAMSetup 1315
  1458. #define kSMSAMStartup 1281
  1459. #define kSMSAMShutdown 1282
  1460. #define kMSAMEnumerate 1283
  1461. #define kMSAMDelete 1284
  1462. #define kMSAMOpen 1288
  1463. #define kMSAMOpenNested 1289
  1464. #define kMSAMClose 1290
  1465. #define kMSAMGetMsgHeader 1297
  1466. #define kMSAMnMarkRecipients 1298
  1467. #define kMSAMGetAttributes 1291
  1468. #define kMSAMGetRecipients 1292
  1469. #define kMSAMGetContent 1293
  1470. #define kMSAMGetEnclosure 1294
  1471. #define kMSAMEnumerateBlocks 1295
  1472. #define kMSAMGetBlock 1296
  1473. #define kMSAMMarkRecipients 1285
  1474. #define kMSAMCreate 1300
  1475. #define kMSAMBeginNested 1301
  1476. #define kMSAMEndNested 1302
  1477. #define kMSAMSubmit 1303
  1478. #define kMSAMPutMsgHeader 1309
  1479. #define kMSAMPutAttribute 1304
  1480. #define kMSAMPutRecipient 1305
  1481. #define kMSAMPutContent 1306
  1482. #define kMSAMPutEnclosure 1307
  1483. #define kMSAMPutBlock 1308
  1484. #define kMSAMCreateReport 1311
  1485. #define kMSAMPutRecipientReport 1312
  1486. #define kMailCreateMailSlot 1323
  1487. #define kMailModifyMailSlot 1324
  1488. union MSAMParam {
  1489.     struct {
  1490.         Ptr                                qLink;
  1491.         long                            reservedH1;
  1492.         long                            reservedH2;
  1493.         MSAMIOCompletionUPP                ioCompletion;
  1494.         OSErr                            ioResult;
  1495.         long                            saveA5;
  1496.         short                            reqCode;
  1497.     }                                header;
  1498.     PMSAMGetMSAMRecordPB            pmsamGetMSAMRecord;
  1499.     PMSAMOpenQueuesPB                pmsamOpenQueues;
  1500.     PMSAMSetStatusPB                pmsamSetStatus;
  1501.     PMSAMLogErrorPB                    pmsamLogError;
  1502.     SMSAMSetupPB                    smsamSetup;
  1503.     SMSAMStartupPB                    smsamStartup;
  1504.     SMSAMShutdownPB                    smsamShutdown;
  1505.     MSAMEnumeratePB                    msamEnumerate;
  1506.     MSAMDeletePB                    msamDelete;
  1507.     MSAMOpenPB                        msamOpen;
  1508.     MSAMOpenNestedPB                msamOpenNested;
  1509.     MSAMClosePB                        msamClose;
  1510.     MSAMGetMsgHeaderPB                msamGetMsgHeader;
  1511.     MSAMGetAttributesPB                msamGetAttributes;
  1512.     MSAMGetRecipientsPB                msamGetRecipients;
  1513.     MSAMGetContentPB                msamGetContent;
  1514.     MSAMGetEnclosurePB                msamGetEnclosure;
  1515.     MSAMEnumerateBlocksPB            msamEnumerateBlocks;
  1516.     MSAMGetBlockPB                    msamGetBlock;
  1517.     MSAMMarkRecipientsPB            msamMarkRecipients;
  1518.     MSAMnMarkRecipientsPB            msamnMarkRecipients;
  1519.     MSAMCreatePB                    msamCreate;
  1520.     MSAMBeginNestedPB                msamBeginNested;
  1521.     MSAMEndNestedPB                    msamEndNested;
  1522.     MSAMSubmitPB                    msamSubmit;
  1523.     MSAMPutMsgHeaderPB                msamPutMsgHeader;
  1524.     MSAMPutAttributePB                msamPutAttribute;
  1525.     MSAMPutRecipientPB                msamPutRecipient;
  1526.     MSAMPutContentPB                msamPutContent;
  1527.     MSAMPutEnclosurePB                msamPutEnclosure;
  1528.     MSAMPutBlockPB                    msamPutBlock;
  1529.     MSAMCreateReportPB                msamCreateReport;            /* Reports and Error Handling Calls */
  1530.     MSAMPutRecipientReportPB        msamPutRecipientReport;
  1531.     PMSAMCreateMsgSummaryPB            pmsamCreateMsgSummary;
  1532.     PMSAMPutMsgSummaryPB            pmsamPutMsgSummary;
  1533.     PMSAMGetMsgSummaryPB            pmsamGetMsgSummary;
  1534.     MailWakeupPMSAMPB                wakeupPMSAM;
  1535.     MailCreateMailSlotPB            createMailSlot;
  1536.     MailModifyMailSlotPB            modifyMailSlot;
  1537. };
  1538. enum {
  1539.     uppMSAMIOCompletionProcInfo = kPascalStackBased
  1540.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(MSAMParam*)))
  1541. };
  1542.  
  1543. #if GENERATINGCFM
  1544. #define CallMSAMIOCompletionProc(userRoutine, paramBlock)        \
  1545.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, (paramBlock))
  1546. #else
  1547. #define CallMSAMIOCompletionProc(userRoutine, paramBlock)        \
  1548.         (*(userRoutine))((paramBlock))
  1549. #endif
  1550.  
  1551. #if GENERATINGCFM
  1552. #define NewMSAMIOCompletionProc(userRoutine)        \
  1553.         (MSAMIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, GetCurrentArchitecture())
  1554. #else
  1555. #define NewMSAMIOCompletionProc(userRoutine)        \
  1556.         ((MSAMIOCompletionUPP) (userRoutine))
  1557. #endif
  1558.  
  1559. extern pascal OSErr MailCreateMailSlot(MSAMParam *paramBlock)
  1560.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1323, 0xAA5E);
  1561. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1562. extern pascal OSErr MailModifyMailSlot(MSAMParam *paramBlock)
  1563.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1324, 0xAA5E);
  1564. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1565. extern pascal OSErr MailWakeupPMSAM(MSAMParam *paramBlock)
  1566.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1287, 0xAA5E);
  1567. /* Personal MSAM Glue Routines */
  1568. extern pascal OSErr PMSAMOpenQueues(MSAMParam *paramBlock)
  1569.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1280, 0xAA5E);
  1570. extern pascal OSErr PMSAMSetStatus(MSAMParam *paramBlock, Boolean asyncFlag)
  1571.  THREEWORDINLINE(0x3f3c, 1319, 0xAA5E);
  1572. /* SYNC ONLY */
  1573. extern pascal OSErr PMSAMGetMSAMRecord(MSAMParam *paramBlock)
  1574.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1286, 0xAA5E);
  1575. /* Server MSAM Glue Routines */
  1576. /* SYNC ONLY */
  1577. extern pascal OSErr SMSAMSetup(MSAMParam *paramBlock)
  1578.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1315, 0xAA5E);
  1579. /* SYNC ONLY */
  1580. extern pascal OSErr SMSAMStartup(MSAMParam *paramBlock)
  1581.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1281, 0xAA5E);
  1582. extern pascal OSErr SMSAMShutdown(MSAMParam *paramBlock, Boolean asyncFlag)
  1583.  THREEWORDINLINE(0x3f3c, 1282, 0xAA5E);
  1584. /* Get Interface Glue Routines */
  1585. extern pascal OSErr MSAMEnumerate(MSAMParam *paramBlock, Boolean asyncFlag)
  1586.  THREEWORDINLINE(0x3f3c, 1283, 0xAA5E);
  1587. extern pascal OSErr MSAMDelete(MSAMParam *paramBlock, Boolean asyncFlag)
  1588.  THREEWORDINLINE(0x3f3c, 1284, 0xAA5E);
  1589. extern pascal OSErr MSAMMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1590.  THREEWORDINLINE(0x3f3c, 1285, 0xAA5E);
  1591. extern pascal OSErr MSAMnMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1592.  THREEWORDINLINE(0x3f3c, 1298, 0xAA5E);
  1593. extern pascal OSErr MSAMOpen(MSAMParam *paramBlock, Boolean asyncFlag)
  1594.  THREEWORDINLINE(0x3f3c, 1288, 0xAA5E);
  1595. extern pascal OSErr MSAMOpenNested(MSAMParam *paramBlock, Boolean asyncFlag)
  1596.  THREEWORDINLINE(0x3f3c, 1289, 0xAA5E);
  1597. extern pascal OSErr MSAMClose(MSAMParam *paramBlock, Boolean asyncFlag)
  1598.  THREEWORDINLINE(0x3f3c, 1290, 0xAA5E);
  1599. extern pascal OSErr MSAMGetRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1600.  THREEWORDINLINE(0x3f3c, 1292, 0xAA5E);
  1601. extern pascal OSErr MSAMGetAttributes(MSAMParam *paramBlock, Boolean asyncFlag)
  1602.  THREEWORDINLINE(0x3f3c, 1291, 0xAA5E);
  1603. extern pascal OSErr MSAMGetContent(MSAMParam *paramBlock, Boolean asyncFlag)
  1604.  THREEWORDINLINE(0x3f3c, 1293, 0xAA5E);
  1605. extern pascal OSErr MSAMGetEnclosure(MSAMParam *paramBlock, Boolean asyncFlag)
  1606.  THREEWORDINLINE(0x3f3c, 1294, 0xAA5E);
  1607. extern pascal OSErr MSAMEnumerateBlocks(MSAMParam *paramBlock, Boolean asyncFlag)
  1608.  THREEWORDINLINE(0x3f3c, 1295, 0xAA5E);
  1609. extern pascal OSErr MSAMGetBlock(MSAMParam *paramBlock, Boolean asyncFlag)
  1610.  THREEWORDINLINE(0x3f3c, 1296, 0xAA5E);
  1611. extern pascal OSErr MSAMGetMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
  1612.  THREEWORDINLINE(0x3f3c, 1297, 0xAA5E);
  1613. /* Put Interface Glue Routines */
  1614. extern pascal OSErr MSAMCreate(MSAMParam *paramBlock, Boolean asyncFlag)
  1615.  THREEWORDINLINE(0x3f3c, 1300, 0xAA5E);
  1616. extern pascal OSErr MSAMBeginNested(MSAMParam *paramBlock, Boolean asyncFlag)
  1617.  THREEWORDINLINE(0x3f3c, 1301, 0xAA5E);
  1618. extern pascal OSErr MSAMEndNested(MSAMParam *paramBlock)
  1619.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1302, 0xAA5E);
  1620. /*  SYNCHRONOUS ONLY */
  1621. extern pascal OSErr MSAMSubmit(MSAMParam *paramBlock)
  1622.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1303, 0xAA5E);
  1623. extern pascal OSErr MSAMPutAttribute(MSAMParam *paramBlock, Boolean asyncFlag)
  1624.  THREEWORDINLINE(0x3f3c, 1304, 0xAA5E);
  1625. extern pascal OSErr MSAMPutRecipient(MSAMParam *paramBlock, Boolean asyncFlag)
  1626.  THREEWORDINLINE(0x3f3c, 1305, 0xAA5E);
  1627. extern pascal OSErr MSAMPutContent(MSAMParam *paramBlock, Boolean asyncFlag)
  1628.  THREEWORDINLINE(0x3f3c, 1306, 0xAA5E);
  1629. /*  SYNCHRONOUS ONLY */
  1630. extern pascal OSErr MSAMPutEnclosure(MSAMParam *paramBlock)
  1631.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1307, 0xAA5E);
  1632. extern pascal OSErr MSAMPutBlock(MSAMParam *paramBlock, Boolean asyncFlag)
  1633.  THREEWORDINLINE(0x3f3c, 1308, 0xAA5E);
  1634. extern pascal OSErr MSAMPutMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
  1635.  THREEWORDINLINE(0x3f3c, 1309, 0xAA5E);
  1636. /* Reports and Error Handling Glue Routines */
  1637. extern pascal OSErr MSAMCreateReport(MSAMParam *paramBlock, Boolean asyncFlag)
  1638.  THREEWORDINLINE(0x3f3c, 1311, 0xAA5E);
  1639. extern pascal OSErr MSAMPutRecipientReport(MSAMParam *paramBlock, Boolean asyncFlag)
  1640.  THREEWORDINLINE(0x3f3c, 1312, 0xAA5E);
  1641. extern pascal OSErr PMSAMLogError(MSAMParam *paramBlock)
  1642.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1313, 0xAA5E);
  1643. /* MsgSummary Glue Routines */
  1644. extern pascal OSErr PMSAMCreateMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1645.  THREEWORDINLINE(0x3f3c, 1314, 0xAA5E);
  1646. extern pascal OSErr PMSAMPutMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1647.  THREEWORDINLINE(0x3f3c, 1317, 0xAA5E);
  1648. extern pascal OSErr PMSAMGetMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1649.  THREEWORDINLINE(0x3f3c, 1318, 0xAA5E);
  1650.  
  1651. #if PRAGMA_IMPORT_SUPPORTED
  1652. #pragma import off
  1653. #endif
  1654.  
  1655. #if PRAGMA_ALIGN_SUPPORTED
  1656. #pragma options align=reset
  1657. #endif
  1658.  
  1659. #ifdef __cplusplus
  1660. }
  1661. #endif
  1662.  
  1663. #endif /* __OCEMAIL__ */
  1664.